﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Collections;
using SteriaMummert.SharePoint.SoftwareFactoryLite.Editors;
using System.Drawing.Design;
using Microsoft.Practices.ComponentModel;
using EnvDTE;

namespace SMC.SPALM.Types
{
    [ServiceDependency(typeof(DTE))]
    [Browsable(true)]
    [TypeConverter(typeof(ExpandableObjectConverter)), CategoryAttribute("Migration Settings")]
    public class FeatureActivationDependency
    {
        private NameValueItem _FeatureID = new NameValueItem();
        private string _FeatureName = "";

        public FeatureActivationDependency()
        {
        }

		[Category("TestProperties")] 
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        [Editor(typeof(SharePointConfigurationFeatureEditor), typeof(UITypeEditor))]
        public NameValueItem FeatureID
		{
            get 
            { 
                return _FeatureID;  
            }
            set 
            {   _FeatureID = value;
            if (_FeatureID != null)
            {   _FeatureName = _FeatureID.Name; 
            }
            }
		}

        [Category("TestProperties")] 
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public string FeatureName
        {
            get { return _FeatureName; }
            set { _FeatureName = value; }
        }
    }
}
